package AchieveList;

import java.util.function.Consumer;

public class Text {
    public static void main(String[] args) {
        SingleLists singleLists = new SingleLists();
        singleLists.addLast(1);
        singleLists.addLast(2);
        singleLists.addLast(3);
        singleLists.addLast(4);
        singleLists.addLast(5);
        singleLists.addLast(6);
/*        singleLists.myPrint();
        System.out.println("----------------------------");

        singleLists.myForEach(new Consumer<Integer>() {
            @Override
            public void accept(Integer integer) {
                System.out.println(integer);
            }
        });*/
        //System.out.println("-----------------------------");
        for (Integer value:singleLists) {
            System.out.println(value);
        }
/*        System.out.println("-----------------------------");
        System.out.println(singleLists.get(4));*/

        System.out.println("--------------------------------");
/*        singleLists.insert(2,7);
        singleLists.myForEach(System.out::println );*/

/*
        singleLists.removeFirst();
        singleLists.removeFirst();
        singleLists.myForEach(System.out::println);
*/
        singleLists.remove(6);
        singleLists.myForEach(System.out::println);

    }
}
